
!(function () {
    var mySwiper = new Swiper('#PAGE_SWIPER_INDEX_TOP', {
        //pagination: '.pagination',
        loop: true,
        nextButton: "#PAGE_SWIPER_INDEX_TOP_PREV",
        prevButton: "#PAGE_SWIPER_INDEX_TOP_NEXT",
        grabCursor: true,
        paginationClickable: true,
        autoplayDisableOnInteraction: false,
        autoplay: 8000,
        onInit: function () {
            if (typeof lazyImgSrc == 'function') {
                lazyImgSrc();
            }
        }
    });

    var myswiper_top = new Swiper('#NEWSPIC_SWIPER_INDEX_TOP', {
        slidesPerView: 1,
        paginationClickable: true,
        spaceBetween: 35,
        loop: true,
        autoplay: 3500,
        pagination: '.swiper-pagination-white',
        paginationClickable: true,
        autoplayDisableOnInteraction: true
    });

    var jinshu = new Vue({
        el : '#marketData',
        data : {
            jinshu : ''
        }
    })

    var now = new Date();
    var day = now.getDay();


    $('.marketData-tip .time').html(showTime());

    function setDate() {
        $.get('https://m.sojex.net/api.do?rtp=typeQuotes&type=3').then(function (res) {
            var data = JSON.parse(res).data;
            jinshu.jinshu = data.list;
        })
    }

    function getData() {
        setDate();
        if(day == 0 || day ==6){
            return ;
        }
        //每5分钟更新一次
        setInterval(setDate,60000);
    }
    getData();

})();